package org.robot.scm.platform.monitor;

import lombok.extern.slf4j.Slf4j;
import org.robot.scm.pojos.config.BaseConfig;
import org.robot.scm.platform.AbstractMonitor;
import org.robot.scm.pojos.BaseNotify;
import org.robot.scm.pojos.enums.PlatformEnum;
import org.robot.scm.utils.RequestHelper;

/**
 * 机器人聊天记录清理
 */
@Slf4j
public class RobotHistoryMonitor extends AbstractMonitor {

    @Override
    public PlatformEnum getPlatform() {
        return PlatformEnum.HISTORY;
    }

    @Override
    public BaseNotify doMonitor(BaseConfig config) {
        String baseUrl = config.getCurrentPlatform().getNoticeSrc();
        RequestHelper.post(baseUrl, "method=ClearMsgList");
        return null;
    }

}
